/**
 * 
 */
package com.cipe.cmrs.controllers.report;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author Incepio
 * 
 */
@Controller
public class ReportController {
    @RequestMapping(value = "/report.do", method = RequestMethod.GET)
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String reportType = request.getParameter("reportType");
        if (!StringUtils.hasText(reportType)) {
            reportType = "Sample Content";
        }
        return new ModelAndView("samplePdfView", "content", reportType);
    }
}
